<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	String fid = request.getParameter("fid");
%>
<link rel="stylesheet" href="<%=basePath %>css/bootstrap.css"/>
<link rel="stylesheet" href="<%=basePath %>css/buttons.css" />
<script type="text/javascript" src="<%=basePath %>js/WdatePicker.js" ></script>
<!-- 城市选择js -->
<script type="text/javascript" src="<%=basePath %>js/selCity/cityList.js" ></script>
<!-- 表单验证js -->
<script src="<%=basePath %>js/Form validation/jquery-1.4.4.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="<%=basePath %>css/Form validation/validator.css"></link>
<script src="<%=basePath %>js/Form validation/formValidator-4.0.1.js" type="text/javascript" charset="UTF-8"></script>
<script src="<%=basePath %>js/Form validation/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
$(document).ready(function(){
	 $("#add").click(function(){
		var $form = $("form");
        $.ajax({
            cache: true,
            type: "POST",
            url: $form.attr("action"),	//提交的url
            data: $form.serialize(), 	
            async: false,
            success: function (data) {
            	alert("添加成功");
            	location.href = "<%=basePath %>badbooking/selBadbookinginfo?fid=<%= fid%>";
            },
            error: function (request) {
                alert("出错了");
                location.reload();
            }
        });
	}); 
	$("#exit").click(function(){
		location.href = "<%=basePath %>badbooking/selBadbookinginfo?fid=<%= fid%>";
	});
}); 
</script>
<script type="text/javascript">

</script>
<body>
	<center>
		<form action="<%=basePath %>badbooking/add"  method="post" role="form" id="form1">
			<table align="center" border="0">
				<tr>
					<td>ID：</td>
					<td>
						<input type="text" id="fid" name="fid" value="<%= fid%>" readonly="readonly"/>
					</td>
					<td></td>
				</tr>
				<tr>
					<br>
					<td>违规类型：</td>
					<td>
						<select id="ftype" name="ftype" class="form-control" style="width:160px;height:30px;">
							<option value="与个人信息不符">与个人信息不符</option>
							<option value="其他">其他</option>
						</select>
					</td>
					<td></td>
				</tr>
				<tr>
					<td>违规描述：</td>
					<td>
						<textarea id="fbz" name="fbz" rows="7" cols="40" style="resize:none"></textarea>
					</td>
					<td></td>
				</tr>
			    <tr>
					<td align="right">解除时间：</td>
					<td><input id="flocktodate" name="flocktodate" type="text"  class="form-control" style="width:160px;height:25px;" onclick="WdatePicker( {el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'} )" readonly></td>
					<td></td>
				</tr>
				<tr>
					<td colspan="3">
						<br>
						<input type="button" value=" 添  加  " id="add" class="button button-pill button-primary" style="width:140px;height:40px;">&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="button" value=" 返  回 " id="exit"  class="button button-pill button-primary" style="width:140px;height:40px;">
					</td>
				</tr>
			</table>		
		</form>
	</center>
</body>
</html>